x
.x[i, j, drop]
x[i, j] <- value
i
and j
are identical, the returned value will be
pdMat
object with the same class as x
. Otherwise, the
returned value will be a matrix. In the case a single row (or column)
is selected, the returned value may be converted to a vector,
according to the rules above.[
, pdMat
pd1 <- pdSymm(diag(3))
pd1[1, , drop = FALSE]pd1[1:2, 1:2] <- 3 * diag(2)
Run the code above in your browser using DataLab